import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooSmsConfigController } from '../../../controllers';
const uctoosmsConfigRouter = new Router();
const smsConfigController = new uctooSmsConfigController();

uctoosmsConfigRouter.post('/add', requireUser, smsConfigController.add);
uctoosmsConfigRouter.post('/edit', requireUser, rowLevelPermission('uctoo/sms_config'), smsConfigController.edit);
uctoosmsConfigRouter.post('/del', requireUser, rowLevelPermission('uctoo/sms_config'), smsConfigController.delete);

//For getting smsConfig with permission control
uctoosmsConfigRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/sms_config'), smsConfigController.getSingle);
uctoosmsConfigRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/sms_config'), smsConfigController.getMany);
uctoosmsConfigRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/sms_config'), smsConfigController.getMany);

//#endregion AutoCreateCode
export default uctoosmsConfigRouter;
